//
//  JYPopContainerView.h
//  s.
//
//  Created by fanshijian on 2022/8/31.
//  Copyright © 2022 J. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^ JYPopVoidBlock) (void);
typedef void (^ JYPopDismissAnimationBlock)(JYPopVoidBlock handelBlock);

@interface JYPopContainerView : UIView

// 是否点击back界面关闭
@property (nonatomic, assign) BOOL isTapBack;

// 背景点击view的颜色
@property (nonatomic, strong) UIColor *backViewColor;

// 背景view的alpha
@property (nonatomic, assign) CGFloat backViewAlpha;

// sub view
@property (nonatomic, strong, readonly) UIView *subView;

// 偏移位置
@property (nonatomic, assign) CGSize centerOffsetSize;

// 消失的动画block
@property (copy, nonatomic) JYPopDismissAnimationBlock dismissAnimationBlock;

/*!
 * 初始化底部弹框容器
 *
 * @param superView 弹框容器的载体
 * @param subView 需要显示在弹框容器的view
 **/
- (instancetype)initWithSuperView:(UIView *)superView withView:(UIView *)subView;


- (void)showBlock:(JYPopVoidBlock)block;
- (void)dissmiss;
// 这里使用了block，之后showBlock中的block就不能用了
- (void)dissmissBlock:(JYPopVoidBlock)block;

@end

NS_ASSUME_NONNULL_END
